Skip to content

Conversation

@adam-alchemy
Copy link
Contributor

Motivation

The ERC-6900 standard does not prohibit post-only execution hooks and permitted call hooks. However, the RI only supported associated post exec hooks.

Solution

  • Refactor execution hooks and permitted call hooks into a reusable HookGroup struct.
  • Add support for post-only hooks during installation and uninstallation.
  • Run post-only hooks during execution. This is achieved by adding them to the end of the array of PostExecToRun items.
  • Fix a bug with pre-exec hooks running with incorrect calldata in executeFromPlugin.
    • This refactor unfortunately caused a stack-too-deep error in the non-IR build, so I also refactored _doPrePermittedCallHooks to take in the key to get back under the stack limit.

@adam-alchemy adam-alchemy merged commit 5ad698e into spec-update-6 Nov 30, 2023
@adam-alchemy adam-alchemy deleted the adam/post-only-hooks branch November 30, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants